<?php

namespace app\admin\controller;

use app\admin\service\WorkbenchService;
use think\response\Json;

/**
 * 工作台
 */
class Index extends AdminController
{
    /**
     * 首页数据
     * @return Json
     */
    public function index()
    {
        return $this->data(WorkbenchService::getHomeData());
    }

    /**
     * 图表数据
     * @return Json
     */
    public function chart()
    {
        return $this->data(WorkbenchService::getHomeChart($this->getData()));
    }
}